using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace vlcplay.Converters
{ public class InverseBoolToVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool boolValue)
            {
                // The "Inverse" part means:
                // If boolValue is true (e.g., a video IS maximized), we want the ItemsControl to be HIDDEN.
                // If boolValue is false (e.g., no video is maximized), we want the ItemsControl to be VISIBLE.
                return boolValue ? Visibility.Hidden : Visibility.Visible;
            }
            // Fallback for non-boolean or null values.
            // Defaulting to Visible, assuming if the binding is problematic, the items should be shown.
            return Visibility.Visible;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}